package cn.like.backEnd.biz.service.impl;

import cn.like.backEnd.biz.mapper.CommonOptLogMapper;
import cn.like.backEnd.biz.service.CommonOptLogService;
import cn.like.entity.CommonOptLog;
import cn.like.log.entity.OptLogDTO;
import cn.like.log.service.LogService;
import cn.like.util.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 系统日志(CommonOptLog)表服务实现类
 *
 * @author like
 * @since 2021-07-08 15:31:26
 */
@Service
public class CommonOptLogServiceImpl extends ServiceImpl<CommonOptLogMapper, CommonOptLog> implements CommonOptLogService, LogService {

    @Override
    public void saveLog(OptLogDTO optLogDTO) {
        final CommonOptLog commonOptLog = BeanUtil.copy(optLogDTO, new CommonOptLog());

        this.save(commonOptLog);
    }
}